package event_handlers

import (
	"fmt"
	"go-ddd-ecommerce/internal/domain/events"
)

// PasswordBoxHandler 密码箱处理器
type PasswordBoxHandler struct{}

func NewPasswordBoxHandler() *PasswordBoxHandler {
	return &PasswordBoxHandler{}
}

func (h *PasswordBoxHandler) Handle(event events.DomainEvent) error {
	switch e := event.(type) {
	case *events.UserPasswordUpdateEvent:
		fmt.Printf("🎯 用户: ID %s,修改了密码,需要触发密码箱服务 \n", e.UserID)
		// 实际项目中这里会调用一系列新增用户修改密码后的操作
		return nil
	default:
		return nil
	}
}
